.userStatusDropdown,
.guestStatusDropdown {
  position: relative;
}

.userStatus {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.3s;

  &:hover {
    background-color: rgba(0, 0, 0, 0.05);
  }

  .username {
    font-size: 15px;  /* 增大一号：13px → 15px */
    color: rgba(0, 0, 0, 0.85);
  }
}

/* 游客登录按钮 - 滑块展开样式 */
.guestButton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 38px;
  border-radius: 0.75rem;
  background-color: #ffffff;
  font-size: 15px; // 增大一号：14px → 15px
  font-weight: 600;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  overflow: hidden; /* 改回hidden，确保滑块效果正确 */
  outline: none;
  margin-left: 12px; /* 添加左边距，让按钮往右移 */
}

/* 按下效果 */
.guestButton:active {
  transform: scale(0.98);
}

/* 左侧滑块 - 初始只占1/4宽度 */
.slideBlock {
  position: absolute;
  left: 0;
  top: 0;
  width: 25% !important; /* 初始宽度 */
  height: 100%;
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  border-radius: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: width 0.5s ease-in-out !important;
  color: #ffffff;
}

.slideBlock svg {
  display: block;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

/* 箭头渐变成"登录"文字 */
.slideBlock::after {
  content: '登录';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  color: #ffffff;
  font-size: 15px; // 增大一号：14px → 15px
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.4s ease 0.15s;
}

/* 按钮文字 - 默认显示 */
.buttonText {
  position: relative;
  z-index: 5;
  margin: 0;
  transform: translateX(6px);
  transition: all 0.3s ease;
  color: #262626;
}

/* 按钮文字 - 悬停时显示（实际不用，用slideBlock::after代替） */
.buttonTextHover {
  display: none;
}

/* 悬停效果 */
.guestButton:hover {
  box-shadow: 0 3px 12px rgba(24, 144, 255, 0.25);
  border-color: #e6f7ff;
}

/* 悬停时滑块展开到全宽 - 关键！ */
.guestButton:hover .slideBlock {
  width: 100% !important;
}

.guestButton:hover .slideBlock svg {
  transform: scale(0) rotate(90deg);
  opacity: 0;
}

/* 箭头消失后，"登录"文字出现 */
.guestButton:hover .slideBlock::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* 悬停时默认文字消失 */
.guestButton:hover .buttonText {
  opacity: 0;
  transform: translateX(12px);
}

/* 下拉菜单 */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-12px) scale(0.92);
  min-width: 200px;
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  border-radius: 16px;
  box-shadow: 
    0 0 0 1px rgba(24, 144, 255, 0.08),
    0 12px 32px rgba(24, 144, 255, 0.12),
    0 24px 64px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform-origin: top center;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1000;
  overflow: hidden;
  padding: 12px 0;
  backdrop-filter: blur(10px);

  /* 顶部小三角 */
  &::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-top: 1px solid rgba(24, 144, 255, 0.08);
    border-left: 1px solid rgba(24, 144, 255, 0.08);
  }

  &.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
  }

  .menuItem {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin: 0 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px; // 增大一号：14px → 15px
    color: #262626;
    background: transparent;
    position: relative;
    border-radius: 8px;
    overflow: hidden;

    /* 左侧渐变条 */
    &::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      width: 4px;
      height: 100%;
      background: linear-gradient(180deg, #1890ff 0%, #40a9ff 100%);
      transform: scaleY(0);
      transform-origin: center;
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      border-radius: 0 2px 2px 0;
    }

    /* Hover光效背景 */
    &::after {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(24, 144, 255, 0.1), transparent);
      transition: left 0.5s ease;
    }

    &:hover {
      background: linear-gradient(90deg, rgba(24, 144, 255, 0.04) 0%, rgba(24, 144, 255, 0.08) 100%);
      color: #1890ff;
      transform: translateX(4px);

      &::before {
        transform: scaleY(1);
      }

      &::after {
        left: 100%;
      }

      .menuIcon {
        transform: scale(1.15) rotate(5deg);
        color: #1890ff;
      }
    }

    .menuIcon {
      margin-right: 12px;
      font-size: 19px; // 增大一号：18px → 19px
      transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
  }

  .logoutItem {
    color: #ff4d4f;

    &::before {
      background: linear-gradient(180deg, #ff4d4f 0%, #ff7875 100%);
    }

    &:hover {
      background: linear-gradient(90deg, rgba(255, 77, 79, 0.04) 0%, rgba(255, 77, 79, 0.08) 100%);
      color: #ff4d4f;

      .menuIcon {
        color: #ff4d4f;
      }
    }

    &::after {
      background: linear-gradient(90deg, transparent, rgba(255, 77, 79, 0.1), transparent);
    }
  }

  .divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(24, 144, 255, 0.1) 50%, transparent 100%);
    margin: 8px 12px;
  }
}

/* 暗色主题适配 */
:global(.dark) {
  .dropdown {
    background: #1f1f1f;
    box-shadow: 
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 8px 24px rgba(0, 0, 0, 0.4),
      0 16px 48px rgba(0, 0, 0, 0.2);

    .menuItem {
      color: rgba(255, 255, 255, 0.85);

      &:hover {
        background: rgba(24, 144, 255, 0.12);
        color: #40a9ff;
      }
    }

    .divider {
      background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    }
  }
}






